<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      div {
        width: 600px;
        background-color: gray;
      }
      img {
        width: 200px;
        /* vertical-align: middle; */

        /* 默认是baseline基线对齐X，会有下面幽灵空白 */
        /* vertical-align: baseline; */

        /* 解决办法1：设置图片的垂直对齐方式为顶部对齐vertical-align: top;，底部对齐vertical-align: bottom;，居中对齐vertical-align: middle;都可以*/
        vertical-align: middle;
      }
    </style>
  </head>
  <body>
    <div><img src="./images/mx.png" alt="" />xg</div>
  </body>
</html>
